package com.caojin.propertyInjector.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.caojin.propertyInjector.locationResolver.ClassPathLocationResolver;
import com.caojin.propertyInjector.locationResolver.LocationResolver;

/**
 * 从类路径中注入配置属性
 * 
 * @author caojin
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER })
public @interface InjectPropFromClassPath {
	//属性名
	String key();
    //父包名
	String basePackage() default ClassPathLocationResolver.DEFAULT_BASE_PACKAGE;
    //配置文件名
	String fileName() default LocationResolver.DEFAULT_FILE_NAME;
    //文件类型
	String fileType() default FileType.PROPERTIES;
    //是否递归
	boolean recursive() default true;
    //是否使用缓存
	boolean useCache() default true;
}